import Vue from 'vue'

import '@babel/polyfill'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

/*
* element
* */
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
Vue.use(ElementUI, { locale })
Vue.prototype.$echarts = echarts

/*
* 全局样式
* */
import '@/styles/index.scss' // global css
import '@/assets/style/border.css'
import '@/assets/style/reset.css'
import './assets/num-family/num-family.css'
import './assets/iconfont/iconfont.css'
import '@/styles/color-base.scss'

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

/* 图表*/
import echarts from 'echarts'
import highcharts from 'highcharts'
import VueHighCharts from 'vue-highcharts'
import highcharts3d from 'highcharts/highcharts-3d'
import cylinder from 'highcharts/modules/cylinder'
highcharts3d(highcharts)
cylinder(highcharts)

/* dataV*/
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

/*全局工具类*/
import validateGlobal from './utils/validate-global'
Vue.prototype.validateGlobal = validateGlobal
/*api*/
import http from './api/http.js'
import ports from './api/ports'
Vue.prototype.http = http
Vue.prototype.ports = ports
/*
* mock
* */
//import { mockXHR } from '../mock'
//if (process.env.NODE_ENV === 'production') {
//  mockXHR()
//}

/*
* 地图
* */
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
  key: 'cfe62d9fabcfa3430777da6b7f362a77',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale'
    ,'AMap.Weather','AMap.Geolocation','AMap.CitySearch', // 天气 定位 城市
    'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType',
    'AMap.PolyEditor', 'AMap.CircleEditor'],
  // 默认高德 sdk 版本为 1.4.4
  v: '1.4.4'
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
